home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 2002 January / PC Answers January 2002.7z / PC Answers January 2002.bin / graphics / freepixl / _SETUP.1 / Flash.pxl < prev    next >
Text File  |  2000-12-23  |  1KB  |  63 lines

  1. Initialize:
  2.     SetColorPalette(GENERATE)
  3.     WinGetActive(Win$)
  4.     UseCoordinates(PIXEL)
  5.     GoSub Draw_Blue_Shade
  6.     UseBackGround(TRANSPARENT,192,192,192)
  7.     DrawBackGround
  8.     SetMouse(0,0,300,200,Test,X,Y)
  9.     WaitInput(100)  {let NT and 95 catch up}
  10.     InfoMenu(REMOVE)
  11.     SetMenu()
  12.     WinLocate(Win$,100,100,400,320,Res){300x220}
  13.     Title$ = "Dialog Frame Box Example"
  14.     WinTitle(Win$, Title$)
  15.  
  16.  
  17.  
  18.     {SetMenu("Exit!",Leave,
  19.         ENDPOPUP,
  20.         "Try",IGNORE,
  21.         "Test",Test,
  22.         "Restart",Initialize,
  23.         ENDPOPUP) }
  24.     
  25. Wait_for_Input:
  26.     WaitInput()
  27.  
  28.  
  29. Leave:
  30.     End
  31.  
  32. Test:
  33.     GoSub Draw_Blue_Shade
  34.     DrawBitMap(50,50, "..\samples\OV09.rle") WaitInput(600)
  35.     DrawBitMap(50,50,"..\samples\OV10.rle") WaitInput(600)
  36.     DrawBitMap(50,50,"..\samples\OV11.rle")
  37.     
  38.     Goto Wait_for_Input
  39.  
  40. {======================================================================}
  41. { Subroutine Draw_Blue_Shade: create a shaded background, black at top }
  42. Draw_Blue_Shade:
  43.     Set Counter = 1
  44.     Set Pen_Colour = 0
  45. InitLoop_0:
  46.     Set Counter = 1
  47.     Set Br_Colour = 0
  48.     Set Y1 = 1
  49.     Set Y2 = 04
  50.     WinGetClientRect(Title$,cx1,cy1,cx2,cy2)
  51. StartLoop_0:
  52.     If Counter > cy2 Then Goto EndLoop_0
  53.         UsePen(NULL,1,0,0,Br_Colour)
  54.         UseBrush(SOLID,0,0,Br_Colour)
  55.         Set Y1 = Counter
  56.         Set Y2 = Counter + 4
  57.         DrawRectangle(1,Y1,300,Y2)
  58.         If Br_Colour < 238 Then Set Br_Colour = Br_Colour + 6
  59.         Set Counter = Counter + 2
  60.     Goto StartLoop_0
  61. EndLoop_0:
  62.     Return
  63.